import { createApp } from 'vue'
import './style.css'
import 'element-plus/dist/index.css'
import VueLazyload from "vue3-lazyload"
import SWUI from "@/package/SwUploadImage/index"
import SWuploadImage from 'sw-upload-image'
import 'sw-upload-image/dist/sw-upload-image.css'
import axios from '@/router/axios'
import App from './App.vue'
import { setToken } from "@/utils/auth"

const token = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0ZW5hbnRfaWQiOiIwMDAwMDAiLCJ1c2VyX25hbWUiOiJhZG1pbiIsInBhcmtfaWQiOiIxNzkyODc3NzE3NzU5MzI4MjU4LDE3OTI4Nzg0MDkyNDA2NzQzMDUsMTc5Mjg3ODY5MDIwMDMyMjA0OSIsInJlYWxfbmFtZSI6IueuoeeQhuWRmOecn-WQjSIsImF2YXRhciI6Ii8wMDAwMDAtc21hcnQtcGFyay91cGxvYWQvMjAyNDA3MjkvNWFkZTk0ZjViODNmOGI5Njc4N2JmNDhjMjIxMmQ4ZDAucG5nIiwic2Vzc2lvbklkIjoibmVXMTJsSF9MQWVONFRiUUdlQXF5NGljT2FYTFJSb1NXZUQzMUNWTiIsImF1dGhvcml0aWVzIjpbImFkbWluaXN0cmF0b3IiLCJpbnZlc3RtZW50T3BlcmF0b3IiLCJzeXNBZG1pbiJdLCJjbGllbnRfaWQiOiJCSSIsInJvbGVfbmFtZSI6ImFkbWluaXN0cmF0b3Isc3lzQWRtaW4saW52ZXN0bWVudE9wZXJhdG9yIiwibGljZW5zZSI6InBvd2VyZWQgYnkgYmxhZGV4IiwicG9zdF9pZCI6IjExMjM1OTg4MTc3Mzg2NzUyMDEiLCJ1c2VyX2lkIjoiMTEyMzU5ODgyMTczODY3NTIwMSIsInJvbGVfaWQiOiIxMTIzNTk4ODE2NzM4Njc1MjAxLDE2OTg1MzA2MjM4MjkzMjc4NzMsMTY5ODUzMDEzMTE0OTYwMjgxOCIsInNjb3BlIjpbImFsbCJdLCJuaWNrX25hbWUiOiLnrqHnkIblkZh4Iiwib2F1dGhfaWQiOiIiLCJkZXRhaWwiOnsidHlwZSI6IndlYiJ9LCJleHAiOjE3Mzk5MzQ1ODEsImRlcHRfaWQiOiIxNjk4NTIwNTQ5MDY5MTc2ODMzIiwianRpIjoiMWQ1MmYzZmMtMWJlMS00Y2JkLWE3NmMtOWExYWI1MWM0MzY4IiwiYWNjb3VudCI6ImFkbWluIn0.W5ccPjGvSlj1eD4SCWMdxdEtWg3PAqIYkj7Iv1yFb2I"
setToken(token)


const app = createApp(App)
app.use(VueLazyload, {})
// 全局配置
app.use(SWuploadImage, {
    url: "/api/blade-resource/oss/endpoint/put-file",
    method: "post",
    headers: {
        "Content-Type": "multipart/form-data"
    },
    timeout: 60000,
    axios,
})
app.use(SWUI, {
    url: "/api/blade-resource/oss/endpoint/put-file",
    method: "post",
    headers: {
        "Content-Type": "multipart/form-data"
    },
    timeout: 60000,
    axios,
})


app.mount('#app')
